package com.yibo.feign.message;


import com.yibo.support.pojo.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "yibo-message",configuration = {FeignClientConfig.class}
,fallbackFactory = CheckWordServiceFallback.class)
public interface CheckWordService {

    static String API = "/api/v1/public/checkWord";

    @PostMapping(API+"/send/email/register/checkword")
    Result<Integer> send(@RequestParam(value = "email") String email,
                                 @RequestParam(value = "type") String type);


    @PostMapping(API+"/email/checkWord")
    Result<String> emailWord(@RequestParam(value = "email") String email,
                             @RequestParam(value = "type") String type);


    @PostMapping(API+"/checkWord/delete")
    Result<Integer> deleteCheckWord(@RequestParam(value = "email") String email,
                                            @RequestParam(value = "type") String type);
}
